<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts: posix/buffer.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">ESP8266ILI9341DisplayProject</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_201f8e026df3a06f760b6173e807b6b9.html">posix</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">buffer.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>character read buffering wrappers for FatFS WHY? Character at a time operation is in FatFS are VERY slow  
<a href="#details">More...</a></p>

<p><a href="buffer_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structbuffer__t.html">buffer_t</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a5a896998acd804cbb68c8c2b8aed3e3c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structbuffer__t.html">buffer_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="buffer_8h.html#a5a896998acd804cbb68c8c2b8aed3e3c">buffer_read_open</a> (char *name, <a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *buf, int size)</td></tr>
<tr class="memdesc:a5a896998acd804cbb68c8c2b8aed3e3c"><td class="mdescLeft">&#160;</td><td class="mdescRight">FatFS does not have a f_fgetc() function Using <a class="el" href="ff_8c.html#ad55dbad62205065ba7e36ae5fc72dac6">f_read()</a> of just 1 byte is VERY VERY SLOW.  <a href="#a5a896998acd804cbb68c8c2b8aed3e3c">More...</a><br /></td></tr>
<tr class="separator:a5a896998acd804cbb68c8c2b8aed3e3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a010cad6baf8e47ce65ddc90f7206b7b4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="buffer_8h.html#a010cad6baf8e47ce65ddc90f7206b7b4">buffer_read_close</a> (<a class="el" href="structbuffer__t.html">buffer_t</a> *p)</td></tr>
<tr class="memdesc:a010cad6baf8e47ce65ddc90f7206b7b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">buffered read close FatFS does not have a f_fgetc() and using <a class="el" href="ff_8c.html#ad55dbad62205065ba7e36ae5fc72dac6">f_read()</a> of just 1 byte is VERY SLOW  <a href="#a010cad6baf8e47ce65ddc90f7206b7b4">More...</a><br /></td></tr>
<tr class="separator:a010cad6baf8e47ce65ddc90f7206b7b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac376df96e4713216095e124c2ee1833c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="buffer_8h.html#ac376df96e4713216095e124c2ee1833c">buffer_ungetc</a> (<a class="el" href="structbuffer__t.html">buffer_t</a> *p, int c)</td></tr>
<tr class="memdesc:ac376df96e4713216095e124c2ee1833c"><td class="mdescLeft">&#160;</td><td class="mdescRight">buffered ungetc  <a href="#ac376df96e4713216095e124c2ee1833c">More...</a><br /></td></tr>
<tr class="separator:ac376df96e4713216095e124c2ee1833c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0744278b18b865f275757ff28e492df8"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="buffer_8h.html#a0744278b18b865f275757ff28e492df8">buffer_getc</a> (<a class="el" href="structbuffer__t.html">buffer_t</a> *p)</td></tr>
<tr class="memdesc:a0744278b18b865f275757ff28e492df8"><td class="mdescLeft">&#160;</td><td class="mdescRight">buffered getc  <a href="#a0744278b18b865f275757ff28e492df8">More...</a><br /></td></tr>
<tr class="separator:a0744278b18b865f275757ff28e492df8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae6f43373941b4428aa8d639e663bb495"><td class="memItemLeft" align="right" valign="top"><a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="buffer_8h.html#ae6f43373941b4428aa8d639e663bb495">buffer_gets</a> (<a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *str, int size, <a class="el" href="structbuffer__t.html">buffer_t</a> *p)</td></tr>
<tr class="memdesc:ae6f43373941b4428aa8d639e663bb495"><td class="mdescLeft">&#160;</td><td class="mdescRight">buffered getc  <a href="#ae6f43373941b4428aa8d639e663bb495">More...</a><br /></td></tr>
<tr class="separator:ae6f43373941b4428aa8d639e663bb495"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>character read buffering wrappers for FatFS WHY? Character at a time operation is in FatFS are VERY slow </p>
<p>character read buffering wrappers for FatFS Character at a time operation is FatFS are VERY slow</p>
<dl class="section user"><dt>Copyright &copy; 2014-2017 Mike Gore, All rights reserved. GPL License</dt><dd></dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="http://github.com/magore/hp85disk">http://github.com/magore/hp85disk</a> </dd>
<dd>
<a href="http://github.com/magore/hp85disk/COPYRIGHT.md">http://github.com/magore/hp85disk/COPYRIGHT.md</a> for specific Copyright details</dd></dl>
<dl class="section user"><dt>You are free to use this code under the terms of GPL</dt><dd>please retain a copy of this notice in any code you use it in.</dd></dl>
<p>This is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.</p>
<p>This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.</p>
<p>You should have received a copy of the GNU General Public License along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>. </p>

<p>Definition in file <a class="el" href="buffer_8h_source.html">buffer.h</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a0744278b18b865f275757ff28e492df8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int buffer_getc </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structbuffer__t.html">buffer_t</a> *&#160;</td>
          <td class="paramname"><em>p</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>buffered getc </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p</td><td>buffer structure ppointer </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>character or EOF </dd></dl>

<p>Definition at line <a class="el" href="buffer_8c_source.html#l00100">100</a> of file <a class="el" href="buffer_8c_source.html">buffer.c</a>.</p>

<p>Referenced by <a class="el" href="buffer_8c_source.html#l00134">buffer_gets()</a>.</p>

</div>
</div>
<a class="anchor" id="ae6f43373941b4428aa8d639e663bb495"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>* buffer_gets </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structbuffer__t.html">buffer_t</a> *&#160;</td>
          <td class="paramname"><em>p</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>buffered getc </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">str</td><td>string </td></tr>
    <tr><td class="paramdir"></td><td class="paramname"></td><td></td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="buffer_8c_source.html#l00134">134</a> of file <a class="el" href="buffer_8c_source.html">buffer.c</a>.</p>

</div>
</div>
<a class="anchor" id="a010cad6baf8e47ce65ddc90f7206b7b4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void buffer_read_close </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structbuffer__t.html">buffer_t</a> *&#160;</td>
          <td class="paramname"><em>p</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>buffered read close FatFS does not have a f_fgetc() and using <a class="el" href="ff_8c.html#ad55dbad62205065ba7e36ae5fc72dac6">f_read()</a> of just 1 byte is VERY SLOW </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p</td><td>buffer structure ppointer </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="buffer_8c_source.html#l00075">75</a> of file <a class="el" href="buffer_8c_source.html">buffer.c</a>.</p>

<p>Referenced by <a class="el" href="buffer_8c_source.html#l00044">buffer_read_open()</a>.</p>

</div>
</div>
<a class="anchor" id="a5a896998acd804cbb68c8c2b8aed3e3c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structbuffer__t.html">buffer_t</a>* buffer_read_open </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>FatFS does not have a f_fgetc() function Using <a class="el" href="ff_8c.html#ad55dbad62205065ba7e36ae5fc72dac6">f_read()</a> of just 1 byte is VERY VERY SLOW. </p>
<p>buffered read open </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">name</td><td>file name </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">buf</td><td>buffer to use when reading </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>buffer size </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="structbuffer__t.html">buffer_t</a> pointer, or NULL on error </dd></dl>
<p>Read and process into image file </p>

<p>Definition at line <a class="el" href="buffer_8c_source.html#l00044">44</a> of file <a class="el" href="buffer_8c_source.html">buffer.c</a>.</p>

</div>
</div>
<a class="anchor" id="ac376df96e4713216095e124c2ee1833c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void buffer_ungetc </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structbuffer__t.html">buffer_t</a> *&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>c</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>buffered ungetc </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p</td><td>buffer structure ppointer </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">c</td><td>character to unget </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="buffer_8c_source.html#l00090">90</a> of file <a class="el" href="buffer_8c_source.html">buffer.c</a>.</p>

<p>Referenced by <a class="el" href="buffer_8c_source.html#l00134">buffer_gets()</a>.</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Jan 31 2018 21:22:16 for ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
